package com.youlu.campus.entity.course.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author : [dengbo]
 * @className : KosCoupons
 * @description : [kos优惠券]
 * @createTime : [2022/9/14 14:21]
 */
@Data
@Document(collection = "kos_coupons")
@CompoundIndexes({
        @CompoundIndex(name = "idx_activity_user", def = "{'activityId':-1,'userId':-1}")
})
public class KosCoupons extends EntityBase {
    /**
     * 兑换码
     */
    @Indexed(unique = true)
    private String redeemCode;
    /**
     * 0 未绑定  1绑定中 2 绑定
     */
    @Indexed
    private Integer status;
    /**
     * 活动Id
     */
    private String  activityId;
    /**
     * 用户Id
     */
    private String userId;
    /**
     * 用户手机号
     */
    private String  phone;
}
